/*
 * rwlocuca.h
 *
 *  Created on: 31/07/2012
 *      Author: utnso
 */

#ifndef RWLOCUCA_H_
#define RWLOCUCA_H_

#define RWLOCUCA_INITIALIZER {PTHREAD_MUTEX_INITIALIZER, NULL, NULL, NULL, NULL};

#include <stdint.h>
#include <pthread.h>
#include <unistd.h>

typedef struct id_node_t {
	uint32_t id;
	struct nodoID_t *sig;
} id_node_t;

typedef struct rwlocuca_t {
	pthread_mutex_t* list_mutex;
	id_node_t* rdqueue;
	id_node_t* wrqueue;
} rwlocuca_t;

#endif /* RWLOCUCA_H_ */
